package app.purchase.a571xz.com.myandroidframe.business.login;

import app.purchase.a571xz.com.myandroidframe.base.mvp.BaseModel;
import app.purchase.a571xz.com.myandroidframe.config.AppConfig;
import app.purchase.a571xz.com.myandroidframe.httpservice.request.LoginRequest;
import app.purchase.a571xz.com.myandroidframe.repository.NetworkRepository;
import app.purchase.a571xz.com.myandroidframe.utils.GsonUtil;
import io.reactivex.Flowable;

public class LoginModel extends BaseModel implements LoginContact.ILoginModel {
    @Override
    public Flowable login(String username, String password) {
        return NetworkRepository.getInstance().getService().login(GsonUtil.getGsonInstance().toJson(new LoginRequest(username, password, AppConfig.LOGINTYPE_PASSWORD)), null);
    }
}
